Here is a typical decision to make if ... Else the general form of the structure is used in most programming languages:
If statement:
The If statement consists of a Boolean expression followed by one or more statements. Grammar:
Syntax for an IF
the format of awhile loop statement:
1. Format:
while (condition of the loop) { loop statement;}
2, while the Loop statement to note matters:1) The While Loop statement is typically the number of times a variable is controlled by its loop.2) The
In the code business, conditional judgment is essential, and the statements that control the flow are similar in each language. Swift includes the following:If,switch,for-in,for,while,do-whileIf condition statement (if-else) (If ... else)Executes
Python introductory statement, including if statement, while statement, for statement, for Python beginners reference.
If statement Example name = ' Peirong '; if name = = ' Peirong ': print ' This is Peirong ', elif name== ' Maojun ': print '
An introductory Python statement that includes an if statement, a while statement, and a for statement for the Python beginner's reference.
If statement Example
name = ' Peirong ';
If name = = ' Peirong ':
print ' is Peirong ';
Elif name== '
A, Shell conditional statement (if usage)
If statement structure [IF/THEN/ELIF/ELSE/FI]
Copy Code code as follows:
If condition test statement
Then
Action
[Elif condition
Action
Else
Action
]
Fi
If
4.2.2 The switch statement that expresses the side-by-side condition selection: If ... If...... If......In the real world, there is a special kind of conditional choice:If it is sunny tomorrow, I will wear a T-shirt;If it is cloudy tomorrow, I will
In awk, flow control statements, syntax structure, and C language type. The usage of each statement is as follows:
In the while, do-while, and for statements of linux awk, break and continue statements can be used to control the process and exit
OneLoop statements (there are two types):While statementFor statementWhile statement:Problem: Enter an integer n to allow the program to output n rows:Hello 1Hello 2.......Hell NWhile statement:Function: Executes a statement or multiple statements
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.